<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
      <el-form-item label="每笔业务的请求编号,规则调用ID,全局唯一" prop="entryId">
        <el-input
          v-model="queryParams.entryId"
          placeholder="请输入每笔业务的请求编号,规则调用ID,全局唯一"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="执行模式(0同步/1异步)" prop="runType">
        <el-select v-model="queryParams.runType" placeholder="请选择执行模式(0同步/1异步)" clearable size="small">
          <el-option label="请选择字典生成" value=""/>
        </el-select>
      </el-form-item>
      <el-form-item label="token" prop="token">
        <el-input
          v-model="queryParams.token"
          placeholder="请输入token"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="业务类型(1授信/2提现)" prop="operType">
        <el-select v-model="queryParams.operType" placeholder="请选择业务类型(1授信/2提现)" clearable size="small">
          <el-option label="请选择字典生成" value=""/>
        </el-select>
      </el-form-item>
      <el-form-item label="客户号" prop="custNo">
        <el-input
          v-model="queryParams.custNo"
          placeholder="请输入客户号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="申请流水号" prop="applySerialNo">
        <el-input
          v-model="queryParams.applySerialNo"
          placeholder="请输入申请流水号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="借据流水号" prop="loanSerialNo">
        <el-input
          v-model="queryParams.loanSerialNo"
          placeholder="请输入借据流水号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="BVN号" prop="bvnNumber">
        <el-input
          v-model="queryParams.bvnNumber"
          placeholder="请输入BVN号"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="总账户数1" prop="totalaccounts1">
        <el-input
          v-model="queryParams.totalaccounts1"
          placeholder="请输入总账户数1"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="周期数" prop="periodnum">
        <el-input
          v-model="queryParams.periodnum"
          placeholder="请输入周期数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="每月分期付款" prop="monthlyinstalment">
        <el-input
          v-model="queryParams.monthlyinstalment"
          placeholder="请输入每月分期付款"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="个人贷款良好数" prop="noofpersonalloanaccountsgood">
        <el-input
          v-model="queryParams.noofpersonalloanaccountsgood"
          placeholder="请输入个人贷款良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="总账户数" prop="totalaccounts">
        <el-input
          v-model="queryParams.totalaccounts"
          placeholder="请输入总账户数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="⽤户名称" prop="subscribername">
        <el-input
          v-model="queryParams.subscribername"
          placeholder="请输入⽤户名称"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="状况良好总账户数" prop="accountingodcondition">
        <el-input
          v-model="queryParams.accountingodcondition"
          placeholder="请输入状况良好总账户数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="拒付总数" prop="totalnumberofdishonoured">
        <el-input
          v-model="queryParams.totalnumberofdishonoured"
          placeholder="请输入拒付总数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="家庭贷款良好数" prop="noofhomeloanaccountsgood">
        <el-input
          v-model="queryParams.noofhomeloanaccountsgood"
          placeholder="请输入家庭贷款良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="家庭贷款不良数" prop="noofhomeloanaccountsbad">
        <el-input
          v-model="queryParams.noofhomeloanaccountsbad"
          placeholder="请输入家庭贷款不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="助学贷款不良数" prop="noofstudyloanaccountsbad">
        <el-input
          v-model="queryParams.noofstudyloanaccountsbad"
          placeholder="请输入助学贷款不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="欠款金额" prop="amountarrear">
        <el-input
          v-model="queryParams.amountarrear"
          placeholder="请输入欠款金额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="是否查得XDS" prop="xdschecked">
        <el-input
          v-model="queryParams.xdschecked"
          placeholder="请输入是否查得XDS"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="判决总额" prop="totaljudgementamount">
        <el-input
          v-model="queryParams.totaljudgementamount"
          placeholder="请输入判决总额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="汽车贷款不良数" prop="noofautoloanaccountsbad">
        <el-input
          v-model="queryParams.noofautoloanaccountsbad"
          placeholder="请输入汽车贷款不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="欠款月数" prop="monthsinarrears">
        <el-input
          v-model="queryParams.monthsinarrears"
          placeholder="请输入欠款月数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最近一次查得XDS时间" prop="lasttimexds">
        <el-input
          v-model="queryParams.lasttimexds"
          placeholder="请输入最近一次查得XDS时间"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="判断书总数" prop="numberofjudgement">
        <el-input
          v-model="queryParams.numberofjudgement"
          placeholder="请输入判断书总数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="未偿债务总额" prop="outstandingdebt">
        <el-input
          v-model="queryParams.outstandingdebt"
          placeholder="请输入未偿债务总额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="拒付总额" prop="totaldishonouredamount">
        <el-input
          v-model="queryParams.totaldishonouredamount"
          placeholder="请输入拒付总额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="账户号码" prop="accountno">
        <el-input
          v-model="queryParams.accountno"
          placeholder="请输入账户号码"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="个人贷款不良数" prop="noofpersonalloanaccountsbad">
        <el-input
          v-model="queryParams.noofpersonalloanaccountsbad"
          placeholder="请输入个人贷款不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最后审判日" prop="lastjudgementdate">
        <el-input
          v-model="queryParams.lastjudgementdate"
          placeholder="请输入最后审判日"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="总欠款账户数" prop="totalaccountarrear">
        <el-input
          v-model="queryParams.totalaccountarrear"
          placeholder="请输入总欠款账户数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="征信还款评分" prop="xdsrating">
        <el-input
          v-model="queryParams.xdsrating"
          placeholder="请输入征信还款评分"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="汽车贷款良好数" prop="noofautoloanccountsgood">
        <el-input
          v-model="queryParams.noofautoloanccountsgood"
          placeholder="请输入汽车贷款良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="助学贷款良好数" prop="noofstudyloanaccountsgood">
        <el-input
          v-model="queryParams.noofstudyloanaccountsgood"
          placeholder="请输入助学贷款良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信非Overdraft最近有效逾期天数" prop="nooverdraftoddaysvalid">
        <el-input
          v-model="queryParams.nooverdraftoddaysvalid"
          placeholder="请输入XDS征信非Overdraft最近有效逾期天数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信非Overdraft逾期订单数" prop="nooverdraftodcnt">
        <el-input
          v-model="queryParams.nooverdraftodcnt"
          placeholder="请输入XDS征信非Overdraft逾期订单数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="信⽤卡良好数" prop="noofcreditcardaccountsgood">
        <el-input
          v-model="queryParams.noofcreditcardaccountsgood"
          placeholder="请输入信⽤卡良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="次贷合同数" prop="numsubstandard">
        <el-input
          v-model="queryParams.numsubstandard"
          placeholder="请输入次贷合同数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="坏账合同数" prop="numlost">
        <el-input
          v-model="queryParams.numlost"
          placeholder="请输入坏账合同数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信Overdraft订单数" prop="overdraftcnt">
        <el-input
          v-model="queryParams.overdraftcnt"
          placeholder="请输入XDS征信Overdraft订单数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信Overdraft逾期订单数" prop="overdraftodcnt">
        <el-input
          v-model="queryParams.overdraftodcnt"
          placeholder="请输入XDS征信Overdraft逾期订单数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="呆账合同数" prop="numdoubtful">
        <el-input
          v-model="queryParams.numdoubtful"
          placeholder="请输入呆账合同数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="最后一次还款时间距当前申请时间" prop="lastrepaydate">
        <el-input
          v-model="queryParams.lastrepaydate"
          placeholder="请输入最后一次还款时间距当前申请时间"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="信⽤卡不良数" prop="noofcreditcardaccountsbad">
        <el-input
          v-model="queryParams.noofcreditcardaccountsbad"
          placeholder="请输入信⽤卡不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信Overdraft逾期金额" prop="overdraftodamt">
        <el-input
          v-model="queryParams.overdraftodamt"
          placeholder="请输入XDS征信Overdraft逾期金额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="在贷合同数" prop="numperforming">
        <el-input
          v-model="queryParams.numperforming"
          placeholder="请输入在贷合同数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="联名贷款账户良好数" prop="noofjointloanaccountsgood">
        <el-input
          v-model="queryParams.noofjointloanaccountsgood"
          placeholder="请输入联名贷款账户良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信非Overdraft订单数" prop="nooverdraftcnt">
        <el-input
          v-model="queryParams.nooverdraftcnt"
          placeholder="请输入XDS征信非Overdraft订单数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="其他账户良好数" prop="noofotheraccountsgood">
        <el-input
          v-model="queryParams.noofotheraccountsgood"
          placeholder="请输入其他账户良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="联名贷款账户不良数" prop="noofjointloanaccountsbad">
        <el-input
          v-model="queryParams.noofjointloanaccountsbad"
          placeholder="请输入联名贷款账户不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="近三个月还款评分最高分" prop="xdsrating3m">
        <el-input
          v-model="queryParams.xdsrating3m"
          placeholder="请输入近三个月还款评分最高分"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="近一个月还款评分最高分" prop="xdsrating1m">
        <el-input
          v-model="queryParams.xdsrating1m"
          placeholder="请输入近一个月还款评分最高分"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="零售不良数" prop="noofretailaccountsbad">
        <el-input
          v-model="queryParams.noofretailaccountsbad"
          placeholder="请输入零售不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信OverdraftM01最大逾期天数" prop="overdraftoddays">
        <el-input
          v-model="queryParams.overdraftoddays"
          placeholder="请输入XDS征信OverdraftM01最大逾期天数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="其他账户不良数" prop="noofotheraccountsbad">
        <el-input
          v-model="queryParams.noofotheraccountsbad"
          placeholder="请输入其他账户不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信非Overdraft逾期金额" prop="nooverdraftodamt">
        <el-input
          v-model="queryParams.nooverdraftodamt"
          placeholder="请输入XDS征信非Overdraft逾期金额"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信非OverdraftM01最大逾期天数" prop="nooverdraftoddays">
        <el-input
          v-model="queryParams.nooverdraftoddays"
          placeholder="请输入XDS征信非OverdraftM01最大逾期天数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="电信账户不良数" prop="nooftelecomaccountsbad">
        <el-input
          v-model="queryParams.nooftelecomaccountsbad"
          placeholder="请输入电信账户不良数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="XDS征信Overdraft最近有效逾期天数" prop="overdraftoddaysvalid">
        <el-input
          v-model="queryParams.overdraftoddaysvalid"
          placeholder="请输入XDS征信Overdraft最近有效逾期天数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="零售良好数" prop="noofretailaccountsgood">
        <el-input
          v-model="queryParams.noofretailaccountsgood"
          placeholder="请输入零售良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="电信账户良好数" prop="nooftelecomaccountsgood">
        <el-input
          v-model="queryParams.nooftelecomaccountsgood"
          placeholder="请输入电信账户良好数"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="状态" prop="state">
        <el-input
          v-model="queryParams.state"
          placeholder="请输入状态"
          clearable
          size="small"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          plain
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['bizsys:rule_in_next_step:add']"
        >新增
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="success"
          plain
          icon="el-icon-edit"
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['bizsys:rule_in_next_step:edit']"
        >修改
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="danger"
          plain
          icon="el-icon-delete"
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['bizsys:rule_in_next_step:remove']"
        >删除
        </el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button
          type="warning"
          plain
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['bizsys:rule_in_next_step:export']"
        >导出
        </el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>

    <el-table v-loading="loading" :data="rule_in_next_stepList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center"/>
      <el-table-column label="PK" align="center" prop="id"/>
      <el-table-column label="每笔业务的请求编号,规则调用ID,全局唯一" align="center" prop="entryId"/>
      <el-table-column label="执行模式(0同步/1异步)" align="center" prop="runType"/>
      <el-table-column label="token" align="center" prop="token"/>
      <el-table-column label="业务类型(1授信/2提现)" align="center" prop="operType"/>
      <el-table-column label="客户号" align="center" prop="custNo"/>
      <el-table-column label="申请流水号" align="center" prop="applySerialNo"/>
      <el-table-column label="借据流水号" align="center" prop="loanSerialNo"/>
      <el-table-column label="BVN号" align="center" prop="bvnNumber"/>
      <el-table-column label="总账户数1" align="center" prop="totalaccounts1"/>
      <el-table-column label="周期数" align="center" prop="periodnum"/>
      <el-table-column label="每月分期付款" align="center" prop="monthlyinstalment"/>
      <el-table-column label="个人贷款良好数" align="center" prop="noofpersonalloanaccountsgood"/>
      <el-table-column label="总账户数" align="center" prop="totalaccounts"/>
      <el-table-column label="⽤户名称" align="center" prop="subscribername"/>
      <el-table-column label="状况良好总账户数" align="center" prop="accountingodcondition"/>
      <el-table-column label="拒付总数" align="center" prop="totalnumberofdishonoured"/>
      <el-table-column label="家庭贷款良好数" align="center" prop="noofhomeloanaccountsgood"/>
      <el-table-column label="家庭贷款不良数" align="center" prop="noofhomeloanaccountsbad"/>
      <el-table-column label="助学贷款不良数" align="center" prop="noofstudyloanaccountsbad"/>
      <el-table-column label="欠款金额" align="center" prop="amountarrear"/>
      <el-table-column label="是否查得XDS" align="center" prop="xdschecked"/>
      <el-table-column label="判决总额" align="center" prop="totaljudgementamount"/>
      <el-table-column label="汽车贷款不良数" align="center" prop="noofautoloanaccountsbad"/>
      <el-table-column label="欠款月数" align="center" prop="monthsinarrears"/>
      <el-table-column label="最近一次查得XDS时间" align="center" prop="lasttimexds"/>
      <el-table-column label="判断书总数" align="center" prop="numberofjudgement"/>
      <el-table-column label="未偿债务总额" align="center" prop="outstandingdebt"/>
      <el-table-column label="拒付总额" align="center" prop="totaldishonouredamount"/>
      <el-table-column label="账户号码" align="center" prop="accountno"/>
      <el-table-column label="个人贷款不良数" align="center" prop="noofpersonalloanaccountsbad"/>
      <el-table-column label="最后审判日" align="center" prop="lastjudgementdate"/>
      <el-table-column label="总欠款账户数" align="center" prop="totalaccountarrear"/>
      <el-table-column label="征信还款评分" align="center" prop="xdsrating"/>
      <el-table-column label="汽车贷款良好数" align="center" prop="noofautoloanccountsgood"/>
      <el-table-column label="助学贷款良好数" align="center" prop="noofstudyloanaccountsgood"/>
      <el-table-column label="XDS征信非Overdraft最近有效逾期天数" align="center" prop="nooverdraftoddaysvalid"/>
      <el-table-column label="XDS征信非Overdraft逾期订单数" align="center" prop="nooverdraftodcnt"/>
      <el-table-column label="信⽤卡良好数" align="center" prop="noofcreditcardaccountsgood"/>
      <el-table-column label="次贷合同数" align="center" prop="numsubstandard"/>
      <el-table-column label="坏账合同数" align="center" prop="numlost"/>
      <el-table-column label="XDS征信Overdraft订单数" align="center" prop="overdraftcnt"/>
      <el-table-column label="XDS征信Overdraft逾期订单数" align="center" prop="overdraftodcnt"/>
      <el-table-column label="呆账合同数" align="center" prop="numdoubtful"/>
      <el-table-column label="最后一次还款时间距当前申请时间" align="center" prop="lastrepaydate"/>
      <el-table-column label="信⽤卡不良数" align="center" prop="noofcreditcardaccountsbad"/>
      <el-table-column label="XDS征信Overdraft逾期金额" align="center" prop="overdraftodamt"/>
      <el-table-column label="在贷合同数" align="center" prop="numperforming"/>
      <el-table-column label="联名贷款账户良好数" align="center" prop="noofjointloanaccountsgood"/>
      <el-table-column label="XDS征信非Overdraft订单数" align="center" prop="nooverdraftcnt"/>
      <el-table-column label="其他账户良好数" align="center" prop="noofotheraccountsgood"/>
      <el-table-column label="联名贷款账户不良数" align="center" prop="noofjointloanaccountsbad"/>
      <el-table-column label="近三个月还款评分最高分" align="center" prop="xdsrating3m"/>
      <el-table-column label="近一个月还款评分最高分" align="center" prop="xdsrating1m"/>
      <el-table-column label="零售不良数" align="center" prop="noofretailaccountsbad"/>
      <el-table-column label="XDS征信OverdraftM01最大逾期天数" align="center" prop="overdraftoddays"/>
      <el-table-column label="其他账户不良数" align="center" prop="noofotheraccountsbad"/>
      <el-table-column label="XDS征信非Overdraft逾期金额" align="center" prop="nooverdraftodamt"/>
      <el-table-column label="XDS征信非OverdraftM01最大逾期天数" align="center" prop="nooverdraftoddays"/>
      <el-table-column label="电信账户不良数" align="center" prop="nooftelecomaccountsbad"/>
      <el-table-column label="XDS征信Overdraft最近有效逾期天数" align="center" prop="overdraftoddaysvalid"/>
      <el-table-column label="零售良好数" align="center" prop="noofretailaccountsgood"/>
      <el-table-column label="电信账户良好数" align="center" prop="nooftelecomaccountsgood"/>
      <el-table-column label="状态" align="center" prop="state"/>
      <el-table-column label="备注" align="center" prop="remark"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['bizsys:rule_in_next_step:edit']"
          >修改
          </el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['bizsys:rule_in_next_step:remove']"
          >删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />

    <!-- 添加或修改规则引擎nextStep补充入参对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
        <el-form-item label="每笔业务的请求编号,规则调用ID,全局唯一" prop="entryId">
          <el-input v-model="form.entryId" placeholder="请输入每笔业务的请求编号,规则调用ID,全局唯一"/>
        </el-form-item>
        <el-form-item label="执行模式(0同步/1异步)" prop="runType">
          <el-select v-model="form.runType" placeholder="请选择执行模式(0同步/1异步)">
            <el-option label="请选择字典生成" value=""/>
          </el-select>
        </el-form-item>
        <el-form-item label="token" prop="token">
          <el-input v-model="form.token" placeholder="请输入token"/>
        </el-form-item>
        <el-form-item label="业务类型(1授信/2提现)" prop="operType">
          <el-select v-model="form.operType" placeholder="请选择业务类型(1授信/2提现)">
            <el-option label="请选择字典生成" value=""/>
          </el-select>
        </el-form-item>
        <el-form-item label="客户号" prop="custNo">
          <el-input v-model="form.custNo" placeholder="请输入客户号"/>
        </el-form-item>
        <el-form-item label="申请流水号" prop="applySerialNo">
          <el-input v-model="form.applySerialNo" placeholder="请输入申请流水号"/>
        </el-form-item>
        <el-form-item label="借据流水号" prop="loanSerialNo">
          <el-input v-model="form.loanSerialNo" placeholder="请输入借据流水号"/>
        </el-form-item>
        <el-form-item label="BVN号" prop="bvnNumber">
          <el-input v-model="form.bvnNumber" placeholder="请输入BVN号"/>
        </el-form-item>
        <el-form-item label="总账户数1" prop="totalaccounts1">
          <el-input v-model="form.totalaccounts1" placeholder="请输入总账户数1"/>
        </el-form-item>
        <el-form-item label="周期数" prop="periodnum">
          <el-input v-model="form.periodnum" placeholder="请输入周期数"/>
        </el-form-item>
        <el-form-item label="每月分期付款" prop="monthlyinstalment">
          <el-input v-model="form.monthlyinstalment" placeholder="请输入每月分期付款"/>
        </el-form-item>
        <el-form-item label="个人贷款良好数" prop="noofpersonalloanaccountsgood">
          <el-input v-model="form.noofpersonalloanaccountsgood" placeholder="请输入个人贷款良好数"/>
        </el-form-item>
        <el-form-item label="总账户数" prop="totalaccounts">
          <el-input v-model="form.totalaccounts" placeholder="请输入总账户数"/>
        </el-form-item>
        <el-form-item label="⽤户名称" prop="subscribername">
          <el-input v-model="form.subscribername" placeholder="请输入⽤户名称"/>
        </el-form-item>
        <el-form-item label="状况良好总账户数" prop="accountingodcondition">
          <el-input v-model="form.accountingodcondition" placeholder="请输入状况良好总账户数"/>
        </el-form-item>
        <el-form-item label="拒付总数" prop="totalnumberofdishonoured">
          <el-input v-model="form.totalnumberofdishonoured" placeholder="请输入拒付总数"/>
        </el-form-item>
        <el-form-item label="家庭贷款良好数" prop="noofhomeloanaccountsgood">
          <el-input v-model="form.noofhomeloanaccountsgood" placeholder="请输入家庭贷款良好数"/>
        </el-form-item>
        <el-form-item label="家庭贷款不良数" prop="noofhomeloanaccountsbad">
          <el-input v-model="form.noofhomeloanaccountsbad" placeholder="请输入家庭贷款不良数"/>
        </el-form-item>
        <el-form-item label="助学贷款不良数" prop="noofstudyloanaccountsbad">
          <el-input v-model="form.noofstudyloanaccountsbad" placeholder="请输入助学贷款不良数"/>
        </el-form-item>
        <el-form-item label="欠款金额" prop="amountarrear">
          <el-input v-model="form.amountarrear" placeholder="请输入欠款金额"/>
        </el-form-item>
        <el-form-item label="是否查得XDS" prop="xdschecked">
          <el-input v-model="form.xdschecked" placeholder="请输入是否查得XDS"/>
        </el-form-item>
        <el-form-item label="判决总额" prop="totaljudgementamount">
          <el-input v-model="form.totaljudgementamount" placeholder="请输入判决总额"/>
        </el-form-item>
        <el-form-item label="汽车贷款不良数" prop="noofautoloanaccountsbad">
          <el-input v-model="form.noofautoloanaccountsbad" placeholder="请输入汽车贷款不良数"/>
        </el-form-item>
        <el-form-item label="欠款月数" prop="monthsinarrears">
          <el-input v-model="form.monthsinarrears" placeholder="请输入欠款月数"/>
        </el-form-item>
        <el-form-item label="最近一次查得XDS时间" prop="lasttimexds">
          <el-input v-model="form.lasttimexds" placeholder="请输入最近一次查得XDS时间"/>
        </el-form-item>
        <el-form-item label="判断书总数" prop="numberofjudgement">
          <el-input v-model="form.numberofjudgement" placeholder="请输入判断书总数"/>
        </el-form-item>
        <el-form-item label="未偿债务总额" prop="outstandingdebt">
          <el-input v-model="form.outstandingdebt" placeholder="请输入未偿债务总额"/>
        </el-form-item>
        <el-form-item label="拒付总额" prop="totaldishonouredamount">
          <el-input v-model="form.totaldishonouredamount" placeholder="请输入拒付总额"/>
        </el-form-item>
        <el-form-item label="账户号码" prop="accountno">
          <el-input v-model="form.accountno" placeholder="请输入账户号码"/>
        </el-form-item>
        <el-form-item label="个人贷款不良数" prop="noofpersonalloanaccountsbad">
          <el-input v-model="form.noofpersonalloanaccountsbad" placeholder="请输入个人贷款不良数"/>
        </el-form-item>
        <el-form-item label="最后审判日" prop="lastjudgementdate">
          <el-input v-model="form.lastjudgementdate" placeholder="请输入最后审判日"/>
        </el-form-item>
        <el-form-item label="总欠款账户数" prop="totalaccountarrear">
          <el-input v-model="form.totalaccountarrear" placeholder="请输入总欠款账户数"/>
        </el-form-item>
        <el-form-item label="征信还款评分" prop="xdsrating">
          <el-input v-model="form.xdsrating" placeholder="请输入征信还款评分"/>
        </el-form-item>
        <el-form-item label="汽车贷款良好数" prop="noofautoloanccountsgood">
          <el-input v-model="form.noofautoloanccountsgood" placeholder="请输入汽车贷款良好数"/>
        </el-form-item>
        <el-form-item label="助学贷款良好数" prop="noofstudyloanaccountsgood">
          <el-input v-model="form.noofstudyloanaccountsgood" placeholder="请输入助学贷款良好数"/>
        </el-form-item>
        <el-form-item label="XDS征信非Overdraft最近有效逾期天数" prop="nooverdraftoddaysvalid">
          <el-input v-model="form.nooverdraftoddaysvalid" placeholder="请输入XDS征信非Overdraft最近有效逾期天数"/>
        </el-form-item>
        <el-form-item label="XDS征信非Overdraft逾期订单数" prop="nooverdraftodcnt">
          <el-input v-model="form.nooverdraftodcnt" placeholder="请输入XDS征信非Overdraft逾期订单数"/>
        </el-form-item>
        <el-form-item label="信⽤卡良好数" prop="noofcreditcardaccountsgood">
          <el-input v-model="form.noofcreditcardaccountsgood" placeholder="请输入信⽤卡良好数"/>
        </el-form-item>
        <el-form-item label="次贷合同数" prop="numsubstandard">
          <el-input v-model="form.numsubstandard" placeholder="请输入次贷合同数"/>
        </el-form-item>
        <el-form-item label="坏账合同数" prop="numlost">
          <el-input v-model="form.numlost" placeholder="请输入坏账合同数"/>
        </el-form-item>
        <el-form-item label="XDS征信Overdraft订单数" prop="overdraftcnt">
          <el-input v-model="form.overdraftcnt" placeholder="请输入XDS征信Overdraft订单数"/>
        </el-form-item>
        <el-form-item label="XDS征信Overdraft逾期订单数" prop="overdraftodcnt">
          <el-input v-model="form.overdraftodcnt" placeholder="请输入XDS征信Overdraft逾期订单数"/>
        </el-form-item>
        <el-form-item label="呆账合同数" prop="numdoubtful">
          <el-input v-model="form.numdoubtful" placeholder="请输入呆账合同数"/>
        </el-form-item>
        <el-form-item label="最后一次还款时间距当前申请时间" prop="lastrepaydate">
          <el-input v-model="form.lastrepaydate" placeholder="请输入最后一次还款时间距当前申请时间"/>
        </el-form-item>
        <el-form-item label="信⽤卡不良数" prop="noofcreditcardaccountsbad">
          <el-input v-model="form.noofcreditcardaccountsbad" placeholder="请输入信⽤卡不良数"/>
        </el-form-item>
        <el-form-item label="XDS征信Overdraft逾期金额" prop="overdraftodamt">
          <el-input v-model="form.overdraftodamt" placeholder="请输入XDS征信Overdraft逾期金额"/>
        </el-form-item>
        <el-form-item label="在贷合同数" prop="numperforming">
          <el-input v-model="form.numperforming" placeholder="请输入在贷合同数"/>
        </el-form-item>
        <el-form-item label="联名贷款账户良好数" prop="noofjointloanaccountsgood">
          <el-input v-model="form.noofjointloanaccountsgood" placeholder="请输入联名贷款账户良好数"/>
        </el-form-item>
        <el-form-item label="XDS征信非Overdraft订单数" prop="nooverdraftcnt">
          <el-input v-model="form.nooverdraftcnt" placeholder="请输入XDS征信非Overdraft订单数"/>
        </el-form-item>
        <el-form-item label="其他账户良好数" prop="noofotheraccountsgood">
          <el-input v-model="form.noofotheraccountsgood" placeholder="请输入其他账户良好数"/>
        </el-form-item>
        <el-form-item label="联名贷款账户不良数" prop="noofjointloanaccountsbad">
          <el-input v-model="form.noofjointloanaccountsbad" placeholder="请输入联名贷款账户不良数"/>
        </el-form-item>
        <el-form-item label="近三个月还款评分最高分" prop="xdsrating3m">
          <el-input v-model="form.xdsrating3m" placeholder="请输入近三个月还款评分最高分"/>
        </el-form-item>
        <el-form-item label="近一个月还款评分最高分" prop="xdsrating1m">
          <el-input v-model="form.xdsrating1m" placeholder="请输入近一个月还款评分最高分"/>
        </el-form-item>
        <el-form-item label="零售不良数" prop="noofretailaccountsbad">
          <el-input v-model="form.noofretailaccountsbad" placeholder="请输入零售不良数"/>
        </el-form-item>
        <el-form-item label="XDS征信OverdraftM01最大逾期天数" prop="overdraftoddays">
          <el-input v-model="form.overdraftoddays" placeholder="请输入XDS征信OverdraftM01最大逾期天数"/>
        </el-form-item>
        <el-form-item label="其他账户不良数" prop="noofotheraccountsbad">
          <el-input v-model="form.noofotheraccountsbad" placeholder="请输入其他账户不良数"/>
        </el-form-item>
        <el-form-item label="XDS征信非Overdraft逾期金额" prop="nooverdraftodamt">
          <el-input v-model="form.nooverdraftodamt" placeholder="请输入XDS征信非Overdraft逾期金额"/>
        </el-form-item>
        <el-form-item label="XDS征信非OverdraftM01最大逾期天数" prop="nooverdraftoddays">
          <el-input v-model="form.nooverdraftoddays" placeholder="请输入XDS征信非OverdraftM01最大逾期天数"/>
        </el-form-item>
        <el-form-item label="电信账户不良数" prop="nooftelecomaccountsbad">
          <el-input v-model="form.nooftelecomaccountsbad" placeholder="请输入电信账户不良数"/>
        </el-form-item>
        <el-form-item label="XDS征信Overdraft最近有效逾期天数" prop="overdraftoddaysvalid">
          <el-input v-model="form.overdraftoddaysvalid" placeholder="请输入XDS征信Overdraft最近有效逾期天数"/>
        </el-form-item>
        <el-form-item label="零售良好数" prop="noofretailaccountsgood">
          <el-input v-model="form.noofretailaccountsgood" placeholder="请输入零售良好数"/>
        </el-form-item>
        <el-form-item label="电信账户良好数" prop="nooftelecomaccountsgood">
          <el-input v-model="form.nooftelecomaccountsgood" placeholder="请输入电信账户良好数"/>
        </el-form-item>
        <el-form-item label="状态" prop="state">
          <el-input v-model="form.state" placeholder="请输入状态"/>
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input v-model="form.remark" placeholder="请输入备注"/>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  listRule_in_next_step,
  getRule_in_next_step,
  delRule_in_next_step,
  addRule_in_next_step,
  updateRule_in_next_step,
  exportRule_in_next_step
} from "@/api/bizsys/rule_in_next_step";

export default {
  name: "Rule_in_next_step",
  components: {},
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 规则引擎nextStep补充入参表格数据
      rule_in_next_stepList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        entryId: null,
        runType: null,
        token: null,
        operType: null,
        custNo: null,
        applySerialNo: null,
        loanSerialNo: null,
        bvnNumber: null,
        totalaccounts1: null,
        periodnum: null,
        monthlyinstalment: null,
        noofpersonalloanaccountsgood: null,
        totalaccounts: null,
        subscribername: null,
        accountingodcondition: null,
        totalnumberofdishonoured: null,
        noofhomeloanaccountsgood: null,
        noofhomeloanaccountsbad: null,
        noofstudyloanaccountsbad: null,
        amountarrear: null,
        xdschecked: null,
        totaljudgementamount: null,
        noofautoloanaccountsbad: null,
        monthsinarrears: null,
        lasttimexds: null,
        numberofjudgement: null,
        outstandingdebt: null,
        totaldishonouredamount: null,
        accountno: null,
        noofpersonalloanaccountsbad: null,
        lastjudgementdate: null,
        totalaccountarrear: null,
        xdsrating: null,
        noofautoloanccountsgood: null,
        noofstudyloanaccountsgood: null,
        nooverdraftoddaysvalid: null,
        nooverdraftodcnt: null,
        noofcreditcardaccountsgood: null,
        numsubstandard: null,
        numlost: null,
        overdraftcnt: null,
        overdraftodcnt: null,
        numdoubtful: null,
        lastrepaydate: null,
        noofcreditcardaccountsbad: null,
        overdraftodamt: null,
        numperforming: null,
        noofjointloanaccountsgood: null,
        nooverdraftcnt: null,
        noofotheraccountsgood: null,
        noofjointloanaccountsbad: null,
        xdsrating3m: null,
        xdsrating1m: null,
        noofretailaccountsbad: null,
        overdraftoddays: null,
        noofotheraccountsbad: null,
        nooverdraftodamt: null,
        nooverdraftoddays: null,
        nooftelecomaccountsbad: null,
        overdraftoddaysvalid: null,
        noofretailaccountsgood: null,
        nooftelecomaccountsgood: null,
        state: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        state: [
          {required: true, message: "状态不能为空", trigger: "blur"}
        ],
        createTime: [
          {required: true, message: "创建时间不能为空", trigger: "blur"}
        ],
        updateTime: [
          {required: true, message: "更新时间不能为空", trigger: "blur"}
        ]
      }
    };
  },
  created() {
    // this.getList();
  },
  methods: {
    /** 查询规则引擎nextStep补充入参列表 */
    getList() {
      this.loading = true;
      listRule_in_next_step(this.queryParams).then(response => {
        this.rule_in_next_stepList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        entryId: null,
        runType: null,
        token: null,
        operType: null,
        custNo: null,
        applySerialNo: null,
        loanSerialNo: null,
        bvnNumber: null,
        totalaccounts1: null,
        periodnum: null,
        monthlyinstalment: null,
        noofpersonalloanaccountsgood: null,
        totalaccounts: null,
        subscribername: null,
        accountingodcondition: null,
        totalnumberofdishonoured: null,
        noofhomeloanaccountsgood: null,
        noofhomeloanaccountsbad: null,
        noofstudyloanaccountsbad: null,
        amountarrear: null,
        xdschecked: null,
        totaljudgementamount: null,
        noofautoloanaccountsbad: null,
        monthsinarrears: null,
        lasttimexds: null,
        numberofjudgement: null,
        outstandingdebt: null,
        totaldishonouredamount: null,
        accountno: null,
        noofpersonalloanaccountsbad: null,
        lastjudgementdate: null,
        totalaccountarrear: null,
        xdsrating: null,
        noofautoloanccountsgood: null,
        noofstudyloanaccountsgood: null,
        nooverdraftoddaysvalid: null,
        nooverdraftodcnt: null,
        noofcreditcardaccountsgood: null,
        numsubstandard: null,
        numlost: null,
        overdraftcnt: null,
        overdraftodcnt: null,
        numdoubtful: null,
        lastrepaydate: null,
        noofcreditcardaccountsbad: null,
        overdraftodamt: null,
        numperforming: null,
        noofjointloanaccountsgood: null,
        nooverdraftcnt: null,
        noofotheraccountsgood: null,
        noofjointloanaccountsbad: null,
        xdsrating3m: null,
        xdsrating1m: null,
        noofretailaccountsbad: null,
        overdraftoddays: null,
        noofotheraccountsbad: null,
        nooverdraftodamt: null,
        nooverdraftoddays: null,
        nooftelecomaccountsbad: null,
        overdraftoddaysvalid: null,
        noofretailaccountsgood: null,
        nooftelecomaccountsgood: null,
        state: null,
        remark: null,
        createTime: null,
        updateTime: null
      };
      this.resetForm("form");
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm");
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length !== 1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "添加规则引擎nextStep补充入参";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const id = row.id || this.ids
      getRule_in_next_step(id).then(response => {
        this.form = response.data;
        this.open = true;
        this.title = "修改规则引擎nextStep补充入参";
      });
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateRule_in_next_step(this.form).then(response => {
              this.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addRule_in_next_step(this.form).then(response => {
              this.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
          }
        }
      });
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids;
      this.$confirm('是否确认删除规则引擎nextStep补充入参编号为"' + ids + '"的数据项?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function () {
        return delRule_in_next_step(ids);
      }).then(() => {
        this.getList();
        this.msgSuccess("删除成功");
      })
    },
    /** 导出按钮操作 */
    handleExport() {
      const queryParams = this.queryParams;
      this.$confirm('是否确认导出所有规则引擎nextStep补充入参数据项?', "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(function () {
        return exportRule_in_next_step(queryParams);
      }).then(response => {
        this.download(response.msg);
      })
    }
  }
};
</script>
